
interface IRoute {
  path: string,
  component?: string,
  name?: string, // 兼容此写法
  icon?: string,
  // 更多功能查看
  // https://beta-pro.ant.design/docs/advanced-menu
  // ---
  // 新页面打开
  target?: string,
  // 不展示顶栏
  headerRender?: boolean,
  // 不展示页脚
  footerRender?: boolean,
  // 不展示菜单
  menuRender?: boolean,
  // 不展示菜单顶栏
  menuHeaderRender?: boolean,
  // 权限配置，需要与 plugin-access 插件配合使用
  access?: string,
  // 隐藏子菜单
  hideChildrenInMenu?: boolean,
  // 隐藏自己和子菜单
  hideInMenu?: boolean,
  // 在面包屑中隐藏
  hideInBreadcrumb?: boolean,
  // 子项往上提，仍旧展示,
  flatMenu?: boolean,
  routes?: IRoute[]
}

const routes: IRoute[] = [
  { path: '/', component: '@/pages/home/index' },
  {
    path: '/login',
    component: '@/pages/login',
    headerRender: false,
    menuRender: false,
    footerRender: false
  }, {
    path: '/banner',
    name: '轮播图管理',
    routes: [{
      path: '/banner/list',
      name: '轮播图列表',
      component: '@/pages/banner'
    },{
      path: '/banner/add',
      name: '添加轮播图',
      component: '@/pages/banner/add'
    }]
  }, {
    path: '/pro',
    name: '商品管理',
    routes: [{
      path: '/pro/list',
      name: '商品列表',
      component: '@/pages/pro'
    },{
      path: '/pro/add',
      name: '添加商品',
      component: '@/pages/pro/add'
    }]
  }
]


export default routes
